﻿using System.Threading.Tasks;
using Microsoft.AspNetCore.SignalR;

namespace ServerConcepts.Hubs.StronglyTypedHubs
{
    public class StronglyTypedChatHub:Hub<IChatClient>
    {
        public async Task SendMessage(string user, string message)
        {
            await Clients.All.ReceiveMessage(user, message);
        }

        public Task SendMessageToCaller(string message)
        {
            return Clients.Caller.ReceiveMessage(message);
        }
    }
}
